#include<stdio.h>
#include<stdlib.h>
int main(int argc,char **argv)
{
	char *srcfile;
	char *destfile;
	FILE *fp1,*fp2;
	char p;
	srcfile=argv[0];
	destfile=argv[1]; 
	fp1=fopen(srcfile,"r");
	if(argc==3)
	{
		if(fp1==0)
		{
			printf("ERROR!");
			exit(1);
		}
		fp2=fopen(destfile,"w");
		if(fp2==0)
		{
			printf("ERROR!");
			exit(1);
		}
		while((p=fgetc(fp1)!=EOF))
		{
			//putchar(p);
			fputc(p,fp2);
		}
	}
	fclose(fp1);
	fclose(fp2);

}
